/* QtLua -- Lua bindings for Qt
   Copyright (C) 2011, Jarek Pelczar

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 3 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General
   Public License along with this library; if not, write to the
   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301 USA

*/

#ifndef QLUASCRIPTDEBUGGERCODEWIDGET_P_H
#define QLUASCRIPTDEBUGGERCODEWIDGET_P_H

#include "qluascriptdebuggercodewidgetinterface_p.h"
#include "qluascriptsdebuggerscriptmodel_p.h"
#include "qluascriptbreakpointmodel_p.h"
#include <QStackedWidget>
#include <QVBoxLayout>

class QLuaScriptDebuggerCodeWidget : public QLuaScriptDebuggerCodeWidgetInterface
{
    Q_OBJECT
public:
    explicit QLuaScriptDebuggerCodeWidget(QWidget *parent = 0);

    virtual QLuaScriptsDebuggerScriptModel * scriptsModel() const;
    virtual void setScriptsModel(QLuaScriptsDebuggerScriptModel * model);

    virtual QLuaScriptBreakpointModel * breakpointsModel() const;
    virtual void setBreakpointsModel(QLuaScriptBreakpointModel * model);

    virtual qint64 currentScriptId() const;
    virtual void setCurrentScript(qint64 id);

    virtual QLuaScriptDebuggerScriptEditorInterface * currentView() const;

    qint64 getScriptId(QLuaScriptDebuggerScriptEditorInterface * v) const;
private:
    QStackedWidget * m_stackedWidget;
    QLuaScriptsDebuggerScriptModel * m_scriptModel;
    QLuaScriptBreakpointModel * m_breakpointModel;
    QHash<qint64, QLuaScriptDebuggerScriptEditorInterface *> m_views;
};

#endif // QLUASCRIPTDEBUGGERCODEWIDGET_P_H
